package physics.collision;

import model.objects.Level;


/**
 * Defines the collision behavior of items that change the player's score.
 * 
 * @author geo4
 * 
 */
public class ScoreChangerStrategy implements CollisionStrategy {

    private int myPointValue;

    /**
     * Creates a new ScoreChangerStrategy in which the score will incremented
     * when a Collidable collides with the item.
     * 
     * @param pointValue amount of points by which to change the score
     */
    public ScoreChangerStrategy (int pointValue) {
        myPointValue = pointValue;
    }

    @Override
    public void collisionAction (Level level, CollisionEvent collisionEvent) {
        level.incrementScore(myPointValue);
        // TODO set invisible/kill
    }

}
